#include <iostream>
#include <vector>

using namespace std;

template <typename T>
class traits
{
public:
    typedef typename T::value_type value_type;

    value_type value;
};
template <typename T>
class traits<T*>
{
public:
    typedef T value_type;

    value_type value;
};

int main(int argc, char *argv[])
{
    traits<vector<int>::iterator> tmp;
    tmp.value = 5;
    cout << tmp.value << endl;

    traits<int*> tmp1;
    tmp1.value = 10;
    cout << tmp1.value << endl;
    return 0;
}
